<template>
  <div id="viewer" ref="imgqj"/>
</template>

<script>
import { Viewer } from 'photo-sphere-viewer'
import 'photo-sphere-viewer/dist/photo-sphere-viewer.css'
export default {
  data() {
    return {
      imgpath: '',
      webCheck: false
    }
  },
  mounted() {
    console.log(this.$route.query.filePath)
    this.imgpath = this.$route.query.filePath
    this.initia()
  },
  methods: {
    initia() {
      this.viewer = new Viewer({
        container: document.querySelector('#viewer'),
        panorama: this.imgpath,
        size: {
          width: '100vw',
          height: '100vh'
        }
      })
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">

</style>
